package edu.spec.pms.model.student;

import edu.spec.pms.model.enumeration.BindStatus;
import edu.spec.pms.model.enumeration.Gender;
import edu.spec.pms.model.enumeration.Status;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "t_student", uniqueConstraints = {@UniqueConstraint(columnNames = {"xh", "open_id"})})
public class Student {
	private int id;
	private String openId;
	private BindStatus bindStatus;
	private String name;
	private String xh;
	private String sfzh;
	private Gender xb;
	private String bjmc;
	private int bjid;
	private String xbmc;
	private int xbid;
	private Status status;
	private Date createDate;
	private Date updateDate;
	private String des;

	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(name = "open_id")
	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

    public BindStatus getBindStatus() {
        return bindStatus;
    }

    public void setBindStatus(BindStatus bindStatus) {
        this.bindStatus = bindStatus;
    }

    public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getXh() {
		return xh;
	}

	public void setXh(String xh) {
		this.xh = xh;
	}

    public String getSfzh() {
        return sfzh;
    }

    public void setSfzh(String sfzh) {
        this.sfzh = sfzh;
    }

    public Gender getXb() {
		return xb;
	}

	public void setXb(Gender xb) {
		this.xb = xb;
	}

	public String getBjmc() {
		return bjmc;
	}

	public void setBjmc(String bjmc) {
		this.bjmc = bjmc;
	}

	public int getBjid() {
		return bjid;
	}

	public void setBjid(int bjid) {
		this.bjid = bjid;
	}

	public String getXbmc() {
		return xbmc;
	}

	public void setXbmc(String xbmc) {
		this.xbmc = xbmc;
	}

	public int getXbid() {
		return xbid;
	}

	public void setXbid(int xbid) {
		this.xbid = xbid;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	@Column(name = "create_date")
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "update_date")
	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public String getDes() {
		return des;
	}

	public void setDes(String des) {
		this.des = des;
	}

	public Student() {
	}

	@Override
	public String toString() {
		return "Student{" +
				"openId='" + openId + '\'' +
				", name='" + name + '\'' +
				", xh='" + xh + '\'' +
				", sfzh='" + sfzh + '\'' +
				'}';
	}
}
